﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Matchers;
using SX.Utils.Log.log4net;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
           // ILog log = LogManager.GetLogger(typeof(Program));
           
            ISchedulerFactory sf = new StdSchedulerFactory();
            IScheduler sched = sf.GetScheduler();
            var groups = sched.GetJobGroupNames();
            foreach (var group in groups)
            {
                var jobs = sched.GetJobKeys(GroupMatcher<JobKey>.GroupEquals(group));
                foreach (var job in jobs)
                {
                    Console.WriteLine("{0}:{1}", group,job.Name);

                    var detail = sched.GetJobDetail(job);
                    Console.WriteLine("{0}",detail.Description);
                }
               
            }
            Console.Read();
        }
    }
}
